<#ibiztemplate>
TARGET=PSWORKFLOW
</#ibiztemplate>
{
    "id" : "${item.getId()}",
    "name" : "${item.getName()}" ,
    "codename" : "${item.getCodeName()}" ,
    "versions":[
<#list item.getPSWFVersions() as version>
        <#if (version_index > 0)>,</#if>{
            "id" : "${version.getId()}",
            "name" : "${version.getName()}" ,
            "version" : ${version.getWFVersion()} ,
            "startnode":"${version.getStartPSWFProcess().getId()}",
            "nodes":[
        <#list version.getPSWFProcesses() as process>
                <#if (process_index > 0)>,</#if>{
                    "id":"${process.getId()}",
                    "name":"${process.getName()}",
                    "codename":"${process.getCodeName()}",
                    "logicname":"${process.getLogicName()}",
                    "wfprocesstype":"${process.getWFProcessType()}",
        <#if process.getWFProcessType()=='INTERACTIVE'>
                    "wfstepvalue":"${process.getWFStepValue()}"
        </#if>
                }
        </#list>
            ],
            "links":[
        <#list version.getPSWFLinks() as link>
                <#if (link_index > 0)>,</#if>{
                    "id":"${link.getId()}",
                    "name":"${link.getName()}",
                    "logicname":"${link.getLogicName()}",
                    "from":"${link.getFromPSWFProcess().getId()}",
                    "to":"${link.getToPSWFProcess().getId()}"
                }
        </#list>
            ]
        }
</#list>        
    ]
}